<?php
/**
 * Maker: 梁康宁
 * Time: 2019-09-08 22:30:36
*/
namespace app\common\model;
use think\Model;
use think\Db;
class FormListItem extends Model
{
    public $typeList = ['1'=>'<font color="green">头部按钮</font>','2'=>'<font color="#663399">头部搜索</font>','3'=>'<font color="#fa8072">列表按钮</font>','4'=>'<font color="#6a5acd">列表标头</font>'];
    public $type = ['1'=>'头部按钮','2'=>'头部搜索','3'=>'列表按钮','4'=>'列表标头'];
	public function formList(){
		return $this->hasOne('FormList', 'id', 'form_list_id');
	}

	public function getTypeTextAttr($value,$data){
        return $this->typeList[$data['type']];
    }

}
?>